home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / var / lib / python-support / python2.6 / rdflib / sparql / bison / QName.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2009-04-20  |  1.3 KB  |  28 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. from rdflib import URIRef
  5. from rdflib.Identifier import Identifier
  6.  
  7. class QName(Identifier):
  8.     __slots__ = ('localname', 'prefix')
  9.     
  10.     def __new__(cls, value):
  11.         
  12.         try:
  13.             inst = unicode.__new__(cls, value)
  14.         except UnicodeDecodeError:
  15.             inst = unicode.__new__(cls, value, 'utf-8')
  16.  
  17.         (inst.prefix, inst.localname) = value.split(':')
  18.         return inst
  19.  
  20.  
  21.  
  22. class QNamePrefix(Identifier):
  23.     
  24.     def __init__(self, prefix):
  25.         super(QNamePrefix, self).__init__(prefix)
  26.  
  27.  
  28.